#include "PreClient.h"
#include "d3dUtility.h"
#include "D3DDemo1.h"
#include "D3DDemo2.h"
#include "D3DDemo3.h"
#include "D3DDemo4.h"

#if(0)
D3DDemo4 demo;

//
// WinMain
//
int WINAPI WinMain(HINSTANCE hinstance,
				   HINSTANCE prevInstance, 
				   PSTR cmdLine,
				   int showCmd)
{
	if(!demo.InitD3D(hinstance,
		640, 480, true, D3DDEVTYPE_HAL))
	{
		::MessageBox(0, "InitD3D() - FAILED", 0, 0);
		return 0;
	}

	if(!demo.Setup())
	{
		::MessageBox(0, "Setup() - FAILED", 0, 0);
		return 0;
	}

	demo.EnterMsgLoop();

	demo.Cleanup();

	demo.destroyD3D();

	return 0;
}
#else
#include "Client1.h"

int WINAPI WinMain(HINSTANCE hinstance,
				   HINSTANCE prevInstance, 
				   PSTR cmdLine,
				   int showCmd)
{

	Client1 client;
	Application app;
	app.setClient(&client);
	app.start(hinstance);
	app.loop();
	app.end();
	return 0;
}
#endif